# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-dulwich
_pkgname=dulwich
pkgver=0.20.44
pkgrel=0
pkgdesc="python implementation of the Git file formats and protocols"
url="https://www.dulwich.io/"
arch="all"
license="GPL-2.0-or-later OR Apache-2.0"
depends="py3-certifi py3-urllib3"
makedepends="py3-setuptools python3-dev"
checkdepends="py3-mock py3-gpgme"
source="https://github.com/jelmer/dulwich/archive/$_pkgname-$pkgver.tar.gz
	skip-network-tests.patch
	"
builddir="$srcdir"/$_pkgname-dulwich-$pkgver

replaces="py-dulwich" # Backwards compatibility
provides="py-dulwich=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 -m unittest dulwich.tests.test_suite
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
b76663eb6583c169df98f488de5db8a2c307b9fa49d4426ad2306ab27cb5da4b41d87481c34080faf49a9605873ef14c8febd8adf07f59f97a2a702831bfb8ed  dulwich-0.20.44.tar.gz
23743222a8306518c855b1f9bfd56e8b09624af4199541c1377a9dea5863f4489133e346b181f4018a64402d45a82ada42130ac1bdfa9163e7ff6586df7e3931  skip-network-tests.patch
"
